package com.pi.base.service;

import java.util.List;

import com.pi.base.common.BasePage;
import com.pi.base.entity.SysMenu;
import com.pi.base.entity.SysMenuExample;
import com.pi.base.entity.SysRole;
import com.pi.base.entity.SysRoleExample;

public interface ISysRoleService {
	
	/**
	 *  根据ID，查询角色对象
	 * @param roleId
	 * @return
	 * @throws Exception
	 */
	public SysRole getRoleById(int roleId) throws Exception;
	
    /**
     * 获取角色列表
     * @param example
     * @param startRows
     * @param rows
     * @return
     * @throws Exception
     */
	public BasePage<SysRole> getRoleListByExample(SysRoleExample example, int page, int rows) throws Exception;

	/**
	 * 新增角色
	 * @param newRole
	 * @param roleMenuIds
	 * @return
	 */
	public boolean insertRole(SysRole newRole, String roleMenuIds) throws Exception;

	/**
	 * 批量删除角色，及其关联菜单
	 * @param removeRoleId
	 * @return
	 * @throws Exception
	 */
//	public boolean roleRemoveByRoleIds(List<Integer> removeRoleId) throws Exception;
	
	/**
	 * 批量禁用角色
	 * @param disableRoleId
	 * @return
	 * @throws Exception
	 */
	public boolean updateRoleStateByRoleIds(List<Integer> roleIds,int roleState) throws Exception;
	
		
	/**
	 * 删除角色，及其关联菜单
	 * @param removeRoleId
	 * @return
	 * @throws Exception
	 */
	public boolean deleteRole(List<Integer> removeRoleId) throws Exception;
	
	/**
	 * 角色修改
	 * @param updatedRole
	 * @param updatedRoleMenuIds
	 * @return
	 * @throws Exception
	 */
	public boolean updateRole(SysRole updatedRole, String updatedRoleMenuIds)  throws Exception;
	
	/**
	 * 根据角色ID，查找按钮CODE的字符串.
	 * @param roleId
	 * @return
	 * @throws Exception
	 */
	public String getButtonCodeStrsByRoleId(Integer roleId) throws Exception;
	
	

	/**
	 * 查询某个条件下角色总数
	 * @param sysRoleExample
	 * @return
	 * @throws Exception
	 */
//	public int getCountRoleListByExample(SysRoleExample sysRoleExample) throws Exception;
	
	/**
	 * 根据角色查询全部菜单
	 * @param roleId
	 * @return
	 * @throws Exception
	 */
	public String queryMenuIdStrsByRoleId(Integer roleId)  throws Exception;
	
}
